﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using WebAutomation.Browsers;

namespace WebAutomation
{
    public abstract class CommandBase:ICommand
    {
        public WebBrowserObject BrowserObject;
        public void Initialize(WebBrowserObject browserObject)
        {
            BrowserObject = browserObject;

        }
        public virtual bool ExecuteCommand(WebBrowserObject browserObject, string[] parameter, string url, string testRepo, string testResultLocation, string dbConnString, ref System.Data.DataSet dataFromDB, ref TestLineResult testLineResult, ref bool stopTest, WebAutoUtils.ITestDataExceptionRules testDataExceptionRules)
        {
            if (browserObject==null)
            {
                browserObject = BrowserObject;
            }
            return this.ExecuteCommand(browserObject, parameter, url, testRepo, testResultLocation, dbConnString,
                                ref dataFromDB, ref testLineResult, ref stopTest, testDataExceptionRules);
        }
    }
}
